#######
#
#   OCTOMA
#   By Cratmang
#
#######

# This game and its material are distributed under a Creative Commons 0 "No Rights Reserved" license.

# It is HIGHLY recommded that you play the game on LUDICROUS SPEED, otherwise the game will be far too slow.
#  (500-1000 cycles/frame might work, but may also trigger epilepsy)

# DEFAULT COLOURS (CGA 1):
# Background  : #000000 (Black)
# Foreground 1: #FF00FF (Fuchsia)
# Foreground 2: #00FFFF (Cyan)
# Blended     : #FFFFFF (White)
# Buzzer      : #000000
# Silence     : #000000

:const DRAW_START_X 4
:const DRAW_START_Y 4
:calc DRAW_CENTER_X { DRAW_START_X + 24 }
:calc DRAW_CENTER_Y { DRAW_START_Y + 24 }
:calc DRAW_END_X { DRAW_START_X + ( 8 * 7 ) }
:calc DRAW_END_Y { DRAW_START_Y + ( 8 * 7 ) }
:calc DRAW_LAST_X { DRAW_END_X - 8 }
:calc DRAW_LAST_Y { DRAW_END_Y - 8 }

:calc UI_START_X { DRAW_END_X + 6 }
:const UI_HP_Y 1
:calc UI_STR_Y { UI_HP_Y + 7 }

:const TILE_SIZE 16
:calc TILE_HALF { TILE_SIZE / 2 }
:const MAP_WIDTH 24

###  PLAYER STATS

: health 1 0 0 #Each digit is an individual byte because it makes them all easier to convert to a string and print.

: healthMax 1 0 0

#: healthArmIncrease 2 I was gonna do an individual value, but it's probably easier to just increase health and max health by a flat hardcoded 100.

: magic 0

:const magicMax 25

:const magicStr 5

: playerPos 5 5  # x y

:const pstr 1

:const pSwordStr 7

: access 10
# This is the highest ID tile that the player (and enemies) can walk through.
# If the player gets the key from killing the Wizard, they can also walk through the locked door.

: targetCo 0 0 #This is the space that the player is attacking or trying to move to.

: hasSword 0
: hasArmor 0

: font
	0x40 0xA0 0xE0 0xA0 0xA0  0x80 0x80 0xC0 0xA0 0xC0  0x60 0x80 0x80 0x80 0x60  0xC0 0xA0 0xA0 0xA0 0xC0 # A B C D
	0xE0 0x80 0xE0 0x80 0xE0  0x60 0x40 0xE0 0x40 0x40  0xE0 0x80 0x80 0xA0 0xE0  0x80 0x80 0xC0 0xA0 0xA0 # E F G H
	0x40 0x00 0x40 0x40 0x40  0xE0 0x40 0x40 0x40 0xC0  0xA0 0xA0 0xC0 0xA0 0xA0  0x80 0x80 0x80 0x80 0xE0 # I J K L
	0x00 0x00 0xC0 0xA0 0xA0  0x00 0xE0 0xa0 0xE0 0x00  0xC0 0xA0 0xC0 0x80 0x80  0xE0 0xA0 0xA0 0xC0 0x20 # N O P Q
	0x00 0x00 0xC0 0x80 0x80  0xC0 0x80 0xC0 0x40 0xC0  0xE0 0x40 0x40 0x40 0x40  0x00 0x00 0xA0 0xA0 0xE0 # R S T U
	0xA0 0xA0 0xA0 0xA0 0x40  0x00 0xA0 0x40 0xA0 0x00  0xA0 0xA0 0x40 0x40 0x40  0xE0 0x20 0x40 0x80 0xE0 # V X Y Z
	0x40 0x40 0x40 0x00 0x40  0x00 0x00 0x00 0x00 0x40  0xC0 0x20 0x60 0x00 0x40  0x40 0xC0 0x40 0x40 0xE0 # ! . ? 1
	0xC0 0x20 0x60 0x80 0xE0  0xC0 0x20 0xC0 0x20 0xC0  0x20 0xA0 0xE0 0x20 0x20  0xE0 0x80 0xC0 0x20 0xC0 # 2 3 4 5
	0x60 0x80 0xE0 0xA0 0xE0  0xE0 0x20 0x40 0xE0 0x40  0xE0 0xA0 0x40 0xA0 0xE0  0xE0 0xA0 0xE0 0x20 0x20 # 6 7 8 9
	0xE0 0xA0 0xA0 0xA0 0xE0  0x00 0x40 0x00 0x40 0x00  0x40 0x80 0x80 0x80 0x40  0x40 0x20 0x20 0x20 0x40 # 0 : ( )
	0x20 0x40 0x40 0x80 0x80 # \ (It's actually reversed, becauses I already use / for new line, and I can't be bothered to go change it
	
# M and W are near-illegeble when they're only 3 pixels wide, so I'm seperating them from the rest of the font.
: fontMW 
	0xF0 0xA8 0xA8 0xA8 0xA8  0x88 0xA8 0xA8 0xA8 0x50 
	
:stringmode text "ABCDEFGHIJKLNOPQRSTUVXYZ!.?1234567890:()\\" {
	:calc addr { font + VALUE * 5 }
	i := addr
	sprite v0 v1 5
	v0 += 4
}
:stringmode text "MW" {
	:calc addr { fontMW + VALUE * 5 }
	i := addr
	sprite v0 v1 5
	v0 += 6
}
:stringmode text " " { v0 += 3 }
:stringmode text "/" { v1 += 7 v0 := UI_START_X }

:const maxEnemies 8
:calc enemyControlLimit { maxEnemies * 4 }
:calc enemySpawnLimit { maxEnemies * 3 }

: main
	hires
	
	#Title Screen
	v0 := 26
	v1 := 0
	v2 := 8
	i := long title
	loop while v0 != 106
		plane 1 sprite v0 v1 8
		i += v2
		plane 2 sprite v0 v1 8
		i += v2
		v1 += 8
		if v1 == 64 begin
			v1 := 0
			v0 += 8
		end
	again
	
	v0 := OCTO_KEY_E
	loop while v0 -key again
	plane 1 clear
	plane 2 clear
	
	vf := 5
	delay-loop
	
	#loop #Game reset loop
	#Draw Frame 
	i := long frame-corner-nw
	v0 := 0 v1 := 2
	plane 1 sprite v0 v1 2
	plane 2 sprite v0 v1 2
	i := long frame-corner-ne
	v0 := DRAW_END_X v1 := 2
	plane 1 sprite v0 v1 2
	plane 2 sprite v0 v1 2
	i := long frame-h
	v0 := DRAW_START_X
	v1 := 1
	loop while v0 != DRAW_END_X
		plane 1 sprite v0 v1 1
		plane 2 sprite v0 v1 1
		v0 += 8
	if v1 < 64 then again
	
	i := long frame-v
	v0 := 1
	v1 := DRAW_START_Y
	loop while v1 != DRAW_END_Y
		plane 1 sprite v0 v1 1
		plane 2 sprite v0 v1 1
		v0 := DRAW_END_X
		v0 += 2
		plane 1 sprite v0 v1 1
		plane 2 sprite v0 v1 1
		v0 := 1
		v1 += 1
		vf := 1
		delay-loop
	again
	
	i := long frame-corner-sw
	v0 := 0 v1 := DRAW_END_Y
	plane 1 sprite v0 v1 2
	plane 2 sprite v0 v1 2
	i := long frame-corner-se
	v0 := DRAW_END_X v1 := DRAW_END_Y
	plane 1 sprite v0 v1 2
	plane 2 sprite v0 v1 2
	i := long frame-h
	v0 := DRAW_START_X
	v1 := 62
	loop while v0 != DRAW_END_X
		plane 1 sprite v0 v1 1
		plane 2 sprite v0 v1 1
		v0 += 8
	if v1 < 64 then again
	
	#UI TEXT
	v0 := UI_START_X v2 := v0
	v1 := 1
	plane 1
	draw-player-health-ui
	v1 := UI_STR_Y
	v0 := UI_START_X
	plane 2
	text "STR: 1"
	
	#Draw Player sprite in center of the screen
	:macro drawPlayer {
		i := long playerSprite
		plane 1
		v0 := DRAW_CENTER_X 
		v1 := DRAW_CENTER_Y
		sprite v0 v1 8
		v2 := TILE_HALF
		i += v2
		plane 2
		sprite v0 v1 8
	}
	drawPlayer
	
	#Set up enemies
	v7 := 0
	v6 := 0
	loop while v7 != enemySpawnLimit
		i := long enemy-spawn-overworld
		spawnEnemy
	again
	
	i := playerPos
	load v8 - v9
	drawMap
	drawEnemies
	
	#v3 and v4 represent the X and Y location that the player will try to access
	v3 := v8 v4 := v9
	
	#v7 will check to see if the player has made an input.
	v7 := 0 
	ve := 0
	
	#Game start!
	loop
		:macro askDirection {
			plane 1
			v0 := DRAW_END_X
			v0 += 5
			v1 := 15
			text "DIRECTION?/"
			v0 := DRAW_END_X
			v0 += 5
			text "(3) TO CANCEL"
		}
		
		#Basic attack
		v0 := OCTO_KEY_1 if v0 key begin
			ve := 1
			askDirection
		end
		
		#Magic Blast
		v0 := OCTO_KEY_2 if v0 key begin
		
		end
		
		loop
			#Movement/Choosing Direction
			v0 := OCTO_KEY_W if v0 key begin
				v4 -= 1
				v7 := 1
				if ve == 1 then ve := 2
			end
			v0 := OCTO_KEY_A if v0 key begin
				v3 -= 1
				v7 := 1
				if ve == 1 then ve := 2
			end
			v0 := OCTO_KEY_S if v0 key begin
				v4 += 1
				v7 := 1
				if ve == 1 then ve := 2
			end
			v0 := OCTO_KEY_D if v0 key begin
				v3 += 1
				v7 := 1
				if ve == 1 then ve := 2
			end
			v0 := OCTO_KEY_Q if v0 key begin
				#No movement
				if ve != 1 then v7 := 1
			end
			
			if ve == 1 begin
				v0 := OCTO_KEY_3 if v0 key begin
					ve := 0
					askDirection
				end
			end
			
			if ve == 2 begin
				askDirection
				ve := 0
				V7 := 2
			end
		if ve != 0 then again
		
		
    if v7 != 0 begin
			#Input recieved. Now to see if it's a valid move...
			va := v3 vb := v4 vc := 0
			# Check collision for movement
			if v7 == 1 then checkCollision
			#If attacking, check if any enemies are on the square we attacked.
			if v7 == 2 begin
				vd := 0
			end
			
			if vd != 2 begin

				i := playerPos
				load v8 - v9
				va := v3 vb := v4
				i := targetCo
				save va - vb
				drawMap
				drawEnemies
				
				#Moving
				if v7 == 1 begin 
					i := targetCo
					load v8 - v9
					va := v8 vb := v9
					#Moving between areas, and spawning enemies
					getTileID
					if ve == 5 begin #Entering Dungeon
						v7 := 0
						v6 := 0
						if v9 == 3 begin #Entering Daiouika Castle
							v8 := 12
							v9 := 81
							loop while v7 != enemySpawnLimit
								i := long enemy-spawn-castle
								spawnEnemy
							again
						end 
						if v9 == 5 begin #Entering the Lost Caves
							v8 := 12
							v9 := 55
							loop while v7 != enemySpawnLimit
								i := long enemy-spawn-cave
								spawnEnemy
							again
						end 
						if v9 == 13 begin #Entering Temple 8
							v8 := 12
							v9 := 25
							loop while v7 != enemySpawnLimit
								i := long enemy-spawn-temple
								spawnEnemy
							again
						end 
					end 
					if ve == 6 begin #Exiting Dungeon
						v7 := 0
						v6 := 0
						loop while v7 != enemySpawnLimit
							i := long enemy-spawn-overworld
							spawnEnemy
						again
						if v9 == 81 begin #Daiouika Castle
							v8 := 12
							v9 := 4
						end 
						if v9 == 55 begin #Lost Caves
							v8 := 19
							v9 := 5
						end 
						if v9 == 25 begin #Temple 8
							v8 := 11
							v9 := 13
						end 
					end

					i := playerPos
					save v8 - v9
					#if v7 := 0
					v7 := 0
				end
				
				drawMap
				
				#Basic Attack
				if v7 == 2 begin
					v7 := 0
					i := targetCo
					load va - vb
					loop
						i := enemies
						i += v7
						
						load v3 
						if v1 == vb begin if v0 == va begin #If an enemy is in this location, that enemy gets attacked
							#Temporary pass off
							v8 := v2
							v9 := v3
							drawEnemies
							i := targetCo
							load va - vb
							v2 := v8 
							v3 := v9
							i := playerPos
							load v8 - v9
							#Brief animation that shows the player "attacking" the enemy
							v5 := va
							v5 -= v8 #v8 and v9 should still be holding the player position
							v5 += 3 #Raises v0 above "negative" value
							v5 += v5 #2
							v5 += v5 #4
							v5 += v5 #8
							v5 += DRAW_START_X #Offset
							v6 := vb
							v6 -= v9
							v6 += 3
							v6 += v6
							v6 += v6
							v6 += v6
							v6 += DRAW_START_Y
							i :=  long hurtBox
							plane 1
							sprite v5 v6 8
							#PLAY THE SOUND OF THEIR PAIN
							i := long audio-hit
							vc := 40 vd := 15
							pitch := vc
							audio buzzer := vd
							vf := 9
							delay-loop
							#Erase the animation
							i :=  long hurtBox
							sprite v5 v6 8
							v8 := v2
							v9 := v3
							drawEnemies
							i := targetCo
							load v1
							load va - vb
							v2 := v8 
							v3 := v9
							i := playerPos
							load v8 - v9
							
							i := hasSword
							load vf - vf
							if vf == 1 begin v4 := pSwordStr else v4 := pstr end
							v3 -= v4
							if v3 > 100 begin #When a number goes below 0, it rolls over to 255. There's no way we'll deal enough damage to roll all the way down to 100, but better safe than sorry.
								#Anyways, this enemy is dead now. Time for loot!
								:macro heal {
									#TO-DO
									plane 1
									draw-player-health-ui
									i := health
									load v2
									v2 += vc
									if v2 > 9 begin v2 -= 10 v1 += 1 end
									v1 += vd
									if v1 > 9 begin v1 -= 10 v0 += 1 end
									i := healthMax
									load vf - vf
									if v0 == vf then load v2
									i := health
									save v2		
									draw-player-health-ui							
								}
								
								if v2 == 1 begin #Shrimp - miniscule EXP, and some health back!
									vd := 0 vc := 2
									heal
								end
								if v2 == 2 begin #Lobster -
									vd := 0 vc := 4
									heal
								end
								if v2 == 3 begin #Waterbear
									vd := 0 vc := 7
									heal
								end
								if v2 == 4 begin #Skull - Lots of EXP
									vd := 0 vc := 1
									heal
								end
								if v2 == 5 begin #Squid
									vd := 1 vc := 0
									heal
								end
								if v2 == 6 begin #If this was THE wizard, turn the tile that he was standing on into a chest (it will contain the key!)
									vd := 2 vd := 5
									heal
									drawMap
									i := targetCo
									load va - vb
									getTileID
									ve := 9
									save ve - ve
									drawMap
									#i := targetCo
									#load v1
								end
								#Set enemy to NOTHING
								v0 := 0
								v1 := 0
								v2 := 0
							end
							i := enemies
							i += v7
							save v3
							v7 := enemyControlLimit
							v7 -= 4
						end end
						v7 += 4
					if v7 != enemyControlLimit then again
					v7 := 0
				end 

				#Enemy movement
				# Loop through each enemy
				#  Check where the player is
				#  Move toward the player
				#    Movement needs to account for walls
				loop
					i := enemies
					i += v7
					load va - vc
					if vc != 0 begin
						load v3 - v4
						v4 -= v9
						v4 += 5
						if v4 < 10 begin
							v3 -= v8
							v3 += 5
							if v3 < 10 begin			

								if v4 > 5 begin
									vb -= 1
									checkCollision
									if vd == 2 then vb += 1
								end
								if v4 < 5 begin
									vb += 1
									checkCollision
									if vd == 2 then vb -= 1
								end
								if v3 > 5 begin
									va -= 1
									checkCollision
									if vd == 2 then va += 1
								end
								if v3 < 5 begin
									va += 1
									checkCollision
									if vd == 2 then va -= 1
								end
								i := enemies
								i += v7 
								save va - vb

					end end end

					v7 += 4
				if v7 != enemyControlLimit then again
				
				drawEnemies
				i := long audio-step
				v2 := 3
				v1 := 34 pitch := v1
				audio buzzer := v2

				va := v8 vb := v9
				getTileID
				if ve == 9 begin # We found treasure!

					# Convert chest into opened chest.
					ve := 10
					save ve - ve

					# Get loot dropped
					if v9 == 33 begin
						#Got the sword!
						v0 := UI_START_X v0 += 19
						v1 := UI_STR_Y
						plane 2 text "1"
						v0 -= 4
						text "7"
						i := hasSword
						vf := 1
						save vf - vf
						i := long swordSprite
						v1 := 50
						v0 := 66
						plane 1 sprite v0 v1 10
						v2 := 10 i += v2
						plane 2 sprite v0 v1 10
					end
					if v9 == 46 begin
						#Got the armor!
						plane 1
						draw-player-health-ui
						#Increase health and max health, then set has armor to true
						
						i := health
						load v0
						v0 += 1
						save v0
						i := healthMax
						load v0
						v0 += 1 
						save v0
						i := hasArmor
						v0 := 1
						save v0
						draw-player-health-ui
						
						v1 := 50
						i := long armourSprite
						v0 := 75
						plane 1 sprite v0 v1 8
						v2 := 8 i += v2
						plane 2 sprite v0 v1 8
					end
					if v9 > 58 begin
						#Got the key from killing the wizard!
						drawMap
						i := long keySprite
						v1 := 50
						v0 := 84
						v1 := 50
						plane 1 sprite v0 v1 9
						v2 := 9 i += v2
						plane 2 sprite v0 v1 9
						i := access
						load v0
						v0 += 1
						save v0
						drawMap
					end

					#Play victory jingle!
					i := long audio-note
					v1 := 96 v2 := 12
					pitch := v1
					audio buzzer := v2
					vf := 7
					delay-loop
					v1 := 120
					pitch := v1
					audio buzzer := v2
					ve := 0
				end
				
			end
			v3 := v8 v4 := v9
			v7 := 1
			
			#Delay to prevent the player from just ZOOMING across the map
			# Copied from the default Octo example project. I only barely understand how it works.
			if ve == 8 begin vf := 60
			else vf := 14 end
			delay-loop
			v7 := 0
			if ve != 8 then ve := 0
		end
		
	 if ve != 8 then again
	 
	 #VICTORY! WE FOUND THE PRINCESS! Draw the Quest Complete screen.
	 drawMap
	 drawEnemies
	 drawPlayer
	 v0 := DRAW_START_X
	 v1 := DRAW_START_Y
	 v2 := TILE_HALF
	 # SWORD
	 i := long vic-sword #TO-DO: condition for if the player has the sacred sword or not
	 loop
	 	plane 1 sprite v0 v1 8
		i += v2
		plane 2 sprite v0 v1 8
		i += v2
		v1 += 8
	 if v1 != DRAW_LAST_Y then again
	 # PLAYER
	 #TO-DO: condition for if the player has the sacred armor or not
	 v3 := 0
	 i := long vic-player
	 loop
	 	v1 := DRAW_START_Y
		v0 += 8
		loop
			plane 1 sprite v0 v1 8
			i += v2
			plane 2 sprite v0 v1 8
			i += v2
			v1 += 8
	 	if v1 != DRAW_LAST_Y then again
	 	v3 += 1
	 if v3 != 3 then again
	 # PRINCESS
	 i := long vic-princess
	 v0 += 8
	 loop
	 	v1 := DRAW_START_Y
		loop
			plane 1 sprite v0 v1 8
			i += v2
			plane 2 sprite v0 v1 8
			i += v2
			v1 += 8
	 	if v1 != DRAW_LAST_Y then again
		v0 += 8
	 if v0 != DRAW_END_X then again
	 #QUEST COMPLETE TEXT
	 i := long vic-quest-complete-text
	 v0 := DRAW_START_X
	 loop
	 	plane 1 sprite v0 v1 8
		i += v2
		plane 2 sprite v0 v1 8
		i += v2
		v0 += 8
	 if v0 != DRAW_END_X then again
	 please-play-again

: spawnEnemy
	#Assumes that i is already set to the list of enemies to spawn, otherwise we're gonna have a problem.
	#Load
	i += v7
	load v2 # X, Y, and ID
	
	i := bestiary
	i += v2 i += v2
	load v3 - v4 #Attack and health
	
	i := enemies
	i += v6
	save v4
	
	#  Next spawn, or trigger exit loop
	v7 += 3
	v6 += 4
;

: getTileID
# Gets the ID of a tile on the map, determined by va (X) and vb (Y), and then loads it to ve.
	
	vd := vb
	if vb > 58 begin #The map is cut into sections 
		i := long map-castle
		vd -= 59
	else if vb > 40 begin
		i := long map-cave
		vd -= 41
	else if vb > 18 begin
		i := long map-temple
		vd -= 19
	else
		i := long map-world
	end end end
	
	vd += vd # 2
	vd += vd # 4
	vd += vd # 8, if we go higher, we risk hitting an interger overflow
	i  += vd #  ... So let's just start pumping it into the i register
	i  += vd # 16
	i  += vd # 24! This is the row we want.
	i += va # Add in the X value, and we find the ID we're looking for.
	
	load ve - ve
;

: checkCollision
	#Check if tile is walkable (Unless the enemy we're moving is a Skull)
	getTileID
	i := access load v5 - v5
	vd := 0
	#Skulls ignore walls
	if vc == 4 then ve := 0
	if ve <= v5 begin
	
	#Check if enemy is standing on tile
		ve := 0
		loop 
			i := enemies
			i += ve
			load v5 - v6
			
			#va and vb SHOULD have the coordinates of the tile we're checking
			if va == v5 then vd += 1
			if vb == v6 then vd += 1
			if vd != 2 then vd := 0
			
			if vd == 2 begin ve := enemyControlLimit ve -= 4 end # Get us out of the loop! There is an enemy here!
			ve += 4
		if ve != enemyControlLimit then again
		
		#Check if player is standing on tile (If we're checking for enemy movement)
		if vc != 0 begin if vd != 2 begin
			i := playerPos
			load v8 - v9
			if va == v8 then vd += 1
			if vb == v9 then vd += 1
			if vd != 2 then vd := 0
			#The player is here! Attack!
			if vd == 2 begin
				i := bestiary
				i += vc 
				i += vc #Get the ID of the enemy we want
				vf := 1
				i += vf #We want that monster's strength
				load ve - ve
				#Check if the player has the armor, and then reduce the attack power of the enemy's attack if they do
				i := hasArmor load vf - vf
				if vf == 1 begin
					ve -= 10
					if ve > 200 then ve := 0
				end
				#NOW TO DEAL THE DAMAGE!
				plane 1
				draw-player-health-ui
				i := health
				load v2
				if ve > 9 begin ve -= 10 v1 -= 1 end
				v2 -= ve
				if v2 > 200 begin #ROLLOVER! We lost a ten. 
					v2 += 10 
					v1 -= 1 
					if v1 > 200 begin
						v1 := 9
						v0 -= 1
						if v0 > 200 begin
							#... I think we're straight up dead now.
							v0 := 0
							v1 := 0
							v2 := 0
				end end end
				save v2
				if v0 == 0 begin if v1 == 0 begin if v2 == 0 begin draw-player-health-ui gameOver end end end
				draw-player-health-ui
				#"Animation"
				plane 2 draw-player-health-ui
				i := long audio-hurt
				v1 := 64 v2 := 15
				pitch := v1
				audio buzzer := v2
	 			drawEnemies
				v0 := DRAW_CENTER_X
				v1 := DRAW_CENTER_Y
				plane 1 i := long hurtBox
				sprite v0 v1 8
				vf := 9
				delay-loop
				drawEnemies
				v0 := DRAW_CENTER_X
				v1 := DRAW_CENTER_Y
				plane 1 i := long hurtBox
				sprite v0 v1 8
				plane 2 draw-player-health-ui
				vd := 2
			end
		end end
		
	else
		vd := 2
	end
;

: drawEnemies
	#Erase/redraw tiles that enemies are standing on
	#We might erase the above code and implement drawing enemies into this
	v5 := 0
	loop
		i := playerPos
		load va - vb
		i := enemies
		i += v5
		load v2
		v0 -= va 
		v0 += 3 #Raises v0 above "negative" value
		if v0 < 7 begin #If the enemy is within the field of view
			v0 += v0 #2
			v0 += v0 #4
			v0 += v0 #8
			v0 += DRAW_START_X #Offset
			v1 -= vb
			v1 += 3
			if v1 < 7 begin
				v1 += v1
				v1 += v1
				v1 += v1
				v1 += DRAW_START_Y
				load va - vb
				drawTile #Erase tile
				
				#Now draw enemy
				i := long enemiesSprites 
				v2 -= 1
				v2 += v2 #Enemy ID * 2
				v2 += v2 # * 4
				v2 += v2 # * 8
				v2 += v2 # * 16
				i += v2
				plane 1 sprite v0 v1 8
				v2 := 8 i += v2
				plane 2 sprite v0 v1 8
				
		end end
		v5  += 4
	if v5 != enemyControlLimit then again
;

### DRAW MAP AND TILES

: drawMap
	v0 := DRAW_START_X  v1 := DRAW_START_Y
	i := playerPos
	load va - vb
	va -= 3	vb -= 3
	
	v2 := 0
	
	loop if v1 != DRAW_END_Y begin
		loop if v0 != DRAW_END_X begin
			
			if vb == v9 then v2 += 1 #These two ifs are a catch to make sure we don't draw on the same tile as a player
			if va == v8 then v2 += 1 #We'll need to do something for enemies later
																# Or adjust the tiles completely
			
			if v2 != 2 then drawTile
			v2 := 0
			
			va += 1
			v0 += 8
			again
		end
		v0 := DRAW_START_X
		va -= 7
		vb += 1
		v1 += 8
		again
	end
;

: drawTile
	#v0 =screen X, v1 = screen Y, va = X, vb = Y, vc = 25 (Width of the map), vd
	getTileID
	
	#Just one caveat - if this is the locked door, and the player has the key, we need to show that the door is open!
	if ve == 11 begin
		i := access
		load vc - vc
		if vc == 11 then ve := 4
	end
	
	i := long tileset
	ve += ve #2
	ve += ve #4
	i += ve
	i += ve # 8
	i += ve
	i += ve # 16
	
	plane 1 sprite v0 v1 8 
	vc := TILE_HALF i += vc
	plane 2 sprite v0 v1 8 
;

: gameOver
	
	# Draw player being dead
	drawEnemies
	drawPlayer
	:macro drawPlayerDead {
		i := long playerSprite_dead
		plane 1
		v0 := DRAW_CENTER_X 
		v1 := DRAW_CENTER_Y
		sprite v0 v1 8
		v2 := 8
		i += v2
		plane 2
		sprite v0 v1 8
	}
	drawPlayerDead
	vf := 100
	delay-loop
	drawPlayerDead
	
	# Erase map and enemies
	drawMap
	drawEnemies
	
	i := long gameover-image
	v0 := DRAW_START_X
	v0 += 8
	v2 := TILE_HALF
	loop
		v1 += 8
		v1 := DRAW_START_Y
		loop
			plane 1 sprite v0 v1 8
			i += v2
			plane 2 sprite v0 v1 8
			i += v2
			v1 += 8
		if v1 != DRAW_LAST_Y then again
		v0 += 8
	if v0 != DRAW_LAST_X then again
	
	i := long gameover-text
	v0 := DRAW_START_X
	loop
		plane 1 sprite v0 v1 8
		i += v2
		plane 2 sprite v0 v1 8
		i += v2
		v0 += 8
	if v0 != DRAW_END_X then again
	
	please-play-again

: please-play-again
	:macro write_pleaseReset {
		v0 := DRAW_END_X
		v0 += 5
		v1 := 30
		text "PLEASE RESET/"
		v0 := DRAW_END_X
		v0 += 5
		text "TO PLAY AGAIN"
	}
	
	plane 1
	write_pleaseReset
	
	plane 2
	#Write just the first line. This will make the two lines flash alternately.
	v0 := DRAW_END_X
	v0 += 5
	v1 := 30
	text "PLEASE RESET/"
	loop
	vf := 7
	delay-loop
	write_pleaseReset again
	#INFINITE LOOP. This is easier than coding a reset into the game.
	
: delay-loop
	delay := vf
	loop
		vf := delay
		if vf != 0 then
	again
;

: draw-player-health-ui
	v0 := DRAW_END_X v0 += 6
	v1 := 1
	text "HP:"
	# Draw Current Health
	i := health
	load v2 - v2 number-to-string
	i := health i += v1 #HOLY SUGAR WAY TO REUSE REGISTERS I AM A GENIUS
	load v2 - v2 number-to-string
	i := health i += v1 i += v1
	load v2 - v2 number-to-string
	text "\\"
	i := healthMax
	load v2 - v2 number-to-string
	i := healthMax i += v1 
	load v2 - v2 number-to-string
	i := healthMax i += v1 i += v1
	load v2 - v2 number-to-string
;

: number-to-string #Uses vf, plus v0 and v1 for drawing the numbers
	if v2 == 0 begin text "0" end # I wanted to use if then, but for some reason, it causes the text command to
	if v2 == 1 begin text "1" end #  write the nuumber multiple times. if begin end doesn't cause this, and I have
	if v2 == 2 begin text "2" end #  absolutely no idea why.
	if v2 == 3 begin text "3" end
	if v2 == 4 begin text "4" end
	if v2 == 5 begin text "5" end 
	if v2 == 6 begin text "6" end
	if v2 == 7 begin text "7" end
	if v2 == 8 begin text "8" end
	if v2 == 9 begin text "9" end
	#It occours to me that vf changes based on factors I do not fully understand. We'll see if drawing with text causes weird stuff to happen
;



### ENEMY STATS
: enemies
#X  Y  ID HP
 0  0  0  0  # 0  / 1
 0  0  0  0  # 5  / 2
 0  0  0  0  # 10 / 3
 0  0  0  0  # 15 / 4
 0  0  0  0  # 20 / 5
 0  0  0  0  # 25 / 6
 0  0  0  0  # 30 / 7
 0  0  0  0  # 35 / 8

: bestiary
#Example Entry: 3 HP, 5 Strength
#Note that "0" actually translates to 1 health - the enemy will count as "dead" when its health rolls to 255.

#0 = Dead or non-existant
0 0

#1 = Shrimp
0 1

#2 = Lobster
2 2

#3 = Waterbear
15 5

#4 = Skull
1 15

#5 = Squid
10 12

#6 = Wizard
30 17


### WORLD MAP

: map-world
# x>   2 (The player may not pass this point)                     22      y
#      |                                                          |       v
13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 31 31 31 31 31 31 31 31 
13 13 13 13 13 13 13 13 13 13 19 20 21 22 23 13 31 31 31 31 31 31 31 31 
13 13 13 13 28 28 28 13 13 15 24 25 15 26 27 15 31 31 31 31 31 31 31 31 
#------|----------------------------------------------------------|------- 2 (The above spacing is to ensure we don't have to render parts of the map that don't exist)
13 13 13 28 1  1  1  13 13 14 1  15 5  15 1  14 31 31 31 31 31 31 31 31 
13 13 13 1  1  30 1  13 13 29 15 14 2  14 15 29 31 31 31 31 31 31 31 31 
13 13 13 1  1  2  1  28 28 13 29 29 3  29 29 13 31 31 31 5  31 31 31 31 
13 13 13 1  1  2  1  1  1  13 13 28 3  28 28 28 31 2  2  2  2  2  31 31 
13 13 13 1  1  2  2  1  1  13 13 1  2  1  1  1  31 2  29 29 1  2  31 31
13 13 13 1  1  1  2  1  1  28 13 1  2  2  2  2  2  2  31 31 29 2  31 31 
13 13 13 29 1  1  2  1  1  1  13 29 29 29 29 1  7  7  7  7  7  2  13 13
13 13 13 13 1  1  2  1  1  1  28 31 31 31 31 31 29 7  7  7  7  2  13 13 
13 13 13 13 1  1  2  1  1  2  2  2  2  2  1  1  7  7  7  7  1  2  13 13 
13 13 13 13 1  1  2  1  1  2  16 17 18 2  1  1  1  1  1  1  1  2  13 13 
13 13 13 13 29 1  2  2  2  2  12 5  12 2  2  2  2  2  2  2  2  2  13 13 
13 13 13 13 13 1  1  1  1  2  2  2  2  2  1  1  1  7  1  1  7  7  13 13 
13 13 13 13 13 29 29 29 1  1  1  1  1  1  1  29 29 29 7  7  7  29 13 13 
13 13 13 13 13 13 13 13 29 29 29 29 29 29 29 13 13 13 29 29 29 13 13 13 
#------|----------------------------------------------------------|------- 16 
13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 
13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 
#------|----------------------------------------------------------|------- 18
: map-temple
13 13 13 13 13 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 13 13 13 13  
13 13 13 13 13 32 32 32 32 32 0  0  0  0  0  32 32 32 32 32 13 13 13 13 
13 13 13 13 13 32 32 32 0  0  0  12 0  12 0  0  0  32 32 32 13 13 13 13 
13 13 13 13 13 32 32 0  0  0  0  0  0  0  0  0  0  0  32 32 13 13 13 13 
13 13 13 13 13 32 0  0  0  32 0  12 0  12 0  32 0  0  0  32 13 13 13 13 
13 13 13 13 13 32 0  0  32 32 0  0  0  0  0  32 32 0  0  32 13 13 13 13 
13 13 13 13 13 32 0  0  32 32 32 32 6  32 32 32 32 0  0  32 13 13 13 13 
13 13 13 13 13 32 0  0  32 32 32 32 32 32 32 32 32 0  0  32 13 13 13 13 
13 13 13 13 13 32 0  0  0  32 32 32 32 32 32 32 0  0  0  32 13 13 13 13 
13 13 13 13 13 32 32 0  0  0  32 32 32 32 32 0  0  0  32 32 13 13 13 13 
13 13 13 13 13 32 32 0  12 0  0  0  0  0  0  0  12 0  32 32 13 13 13 13 
13 13 13 13 13 32 32 0  0  0  32 32 32 32 32 0  0  0  32 32 13 13 13 13 
13 13 13 13 13 32 0  0  0  32 32 32 32 32 32 32 0  0  0  32 13 13 13 13 
13 13 13 13 13 32 0  0  32 32 32 0  0  0  32 32 32 0  0  32 13 13 13 13 
13 13 13 13 13 32 0  0  32 32 32 0  9  0  32 32 32 0  0  32 13 13 13 13
13 13 13 13 13 32 0  0  32 32 32 0  0  0  32 32 32 0  0  32 13 13 13 13 
13 13 13 13 13 32 0  0  0  32 32 32 0  32 32 32 0  0  0  32 13 13 13 13 
13 13 13 13 13 32 32 0  0  0  0  0  0  0  0  0  0  0  32 32 13 13 13 13 
13 13 13 13 13 32 32 32 0  0  0  0  0  0  0  0  0  32 32 32 13 13 13 13 
13 13 13 13 13 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 13 13 13 13 
#------|----------------------------------------------------------|------- 38
13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 
13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 
#------|----------------------------------------------------------|------- 40
: map-cave
13 13 13 13 29 29 13 13 29 29 29 13 13 13 13 13 13 13 13 13 13 13 13 13 
13 13 13 13 1  1  13 13 1  1  1  13 13 13 13 29 29 29 29 29 29 13 13 13 
13 13 13 29 1  1  13 29 1  13 1  13 13 13 13 1  1  1  1  1  1  29 13 13 
13 13 13 1  1  1  13 1  1  13 1  29 29 29 13 1  1  13 29 1  1  1  13 13 
13 13 13 1  1  29 13 1  29 13 1  1  1  1  29 29 1  13 1  1  1  1  13 13 
13 13 13 1  1  31 13 1  1  29 29 29 9  29 1  1  1  13 1  29 29 29 13 13 
13 13 13 1  1  1  13 1  1  1  1  1  29 1  1  1  1  13 1  1  1  1  13 13 
13 13 13 13 1  1  29 13 1  1  1  1  1  1  1  1  13 13 13 13 1  1  13 13 
13 13 13 13 1  1  1  29 13 29 29 29 29 29 29 29 13 13 13 29 1  1  13 13 
13 13 13 13 1  1  1  1  29 1  1  1  1  1  1  1  29 13 13 1  1  1  13 13 
13 13 13 13 13 13 1  1  1  1  1  1  1  1  1  1  1  29 29 1  1  13 13 13
13 13 13 13 13 13 13 13 13 13 13 1  29 13 13 1  1  1  1  1  13 13 13 13 
13 13 13 13 13 13 13 13 13 13 13 1  1  13 13 13 1  1  1  1  13 13 13 13 
13 13 13 13 13 13 13 13 13 13 13 13 1  13 13 13 13 13 13 13 13 13 13 13 
13 13 13 13 13 13 13 13 13 13 13 13 6  13 13 13 13 13 13 13 13 13 13 13 
#------|----------------------------------------------------------|------- 55
13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 
13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 
13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13
#------|----------------------------------------------------------|------- 58
: map-castle
13 13 13 13 13 13 13 13 13 13 13 13 33 13 13 13 13 13 13 13 13 13 13 13
13 13 13 13 13 13 13 13 13 13 13 33 8  33 13 13 13 13 13 13 13 13 13 13 
13 13 13 13 13 13 13 13 13 13 33 0  4  0  33 13 13 13 13 13 13 13 13 13
13 13 13 13 13 13 13 13 13 33 0  0  4  0  0  33 13 13 13 13 13 13 13 13
13 13 13 33 33 33 33 33 33 33 33 33 11 33 33 33 33 33 33 33 33 33 13 13 
13 13 13 33 0  4  0  33 33 0  0  0  4  0  0  0  33 33 0  4  0  33 13 13
13 13 13 33 0  4  0  0  0  0  0  0  4  0  0  0  0  0  0  4  0  33 13 13
13 13 13 33 0  4  0  33 33 0  0  0  4  0  0  0  33 33 0  4  0  33 13 13 
13 13 13 33 0  4  0  33 33 0  0  0  4  0  0  0  33 33 0  4  0  33 13 13
13 13 13 33 0  4  0  33 33 33 33 33 4  33 33 33 33 33 0  4  0  33 13 13
13 13 13 33 0  4  0  33 0  0  0  0  4  0  0  0  0  33 0  4  0  33 13 13 
13 13 13 33 0  4  0  33 0  12 0  33 33 33 0  12 0  33 0  4  0  33 13 13
13 13 13 33 0  4  0  33 0  0  0  0  12 0  0  0  0  33 0  4  0  33 13 13
13 13 13 33 0  4  0  33 0  0  0  0  0  0  0  0  0  33 0  4  0  33 13 13 
13 13 13 33 0  4  0  33 33 33 0  33 33 33 0  33 33 33 0  4  0  33 13 13
13 13 13 33 0  4  0  33 33 0  0  0  4  0  0  0  33 33 0  4  0  33 13 13
13 13 13 33 0  4  0  33 33 0 12  0  4  0  12 0  33 33 0  4  0  33 13 13 
13 13 13 33 0  4  0  33 33 0  0  0  4  0  0  0  33 33 0  4  0  33 13 13
13 13 13 33 0  4  0  0  0  0 12  0  4  0  12 0  0  0  0  4  0  33 13 13
13 13 13 33 0  4  0  33 33 0  0  0  4  0  0  0  33 33 0  4  0  33 13 13 
13 13 13 33 0  4  0  33 33 0 12  0  4  0  12 0  33 33 0  4  0  33 13 13
13 13 13 33 33 33 33 33 33 0  0  0  4  0  0  0  33 33 33 33 33 33 13 13
13 13 13 13 13 13 13 13 33 33 33 33 6  33 33 33 33 13 13 13 13 13 13 13 
#------|----------------------------------------------------------|------- 81
13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 
13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 
13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 

### ENEMY SPAWN LISTS
#I wanted to do random spawns, but this is much easier.
#QUICK ID REFRECE:
#1 = Shrimp
#2 = Lobster
#3 = Waterbear
#4 = Skull
#5 = Squid
#6 = Wizard
: enemy-spawn-overworld
#X  Y  ID
 6  10 1 #1
 7  14 1 #2
 15 14 1 #3
 20 7  2 #4
 11 7  2 #5
 0  0  0 #6
 0  0  0 #7
 0  0  0 #8
: enemy-spawn-cave
#X  Y  ID
 11 50 3 #1
 19 52 3 #2
 4  42 3 #3
 13 45 3 #4
 15 47 3 #5
 2  51 4 #6
 21 44 4 #7
 13 41 4 #8
: enemy-spawn-temple
#X  Y  ID
 8  27 2 #1
 16 27 2 #2
 12 29 2 #3
 8  36 2 #4
 16 36 2 #5
 12 33 2 #6
 0  0  0 #7
 0  0  0 #8
: enemy-spawn-castle
#X  Y  ID
 12 66 6 #1
 12 69 5 #2
 5  71 5 #3
 19 71 5 #4
 11 74 5 #5
 13 74 5 #6
 10 72 5 #7
 14 72 5 #8



### SPRITES
# Each sprite is 8x8 pixels, and is drawn in two layers: Pink, then Blue. Overlapping pixels turn white.

: tileset

#0 = Blank Space
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00

#1 = Ground
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x20 0x00 0x00 0x02 0x00 0x40 0x00

#2 = Pathway
0x0C 0xC0 0x02 0x60 0x00 0x06 0x20 0x80
0x0C 0xC0 0x02 0x60 0x00 0x06 0x20 0x80

#3 = Bridge
0x81 0x81 0x81 0x81 0x81 0x81 0x81 0x81
0xBD 0xBD 0x81 0xBD 0xBD 0x81 0xBD 0x81

#4 = Carpet
0x42 0x42 0x42 0x42 0x42 0x42 0x42 0x42 
0x7E 0x7E 0x7E 0x7E 0x7E 0x7E 0x7E 0x7E

#5 = Door into dungeon
0x00 0x18 0x24 0x42 0x42 0x42 0x42 0x00
0x00 0x18 0x24 0x42 0x42 0x42 0x42 0x00

#6 = Door out of dungeon
0x00 0x00 0x18 0x3C 0x3C 0x3C 0x3C 0x00
0x00 0x00 0x18 0x3C 0x3C 0x3C 0x3C 0x00

#7 = Seaweed
0xAA 0xBE 0xCD 0x7E 0xED 0xEF 0x77 0xEE
0x00 0x24 0x48 0x48 0x44 0x22 0x22 0x44

#8 = Princess's space
0x00 0x22 0x71 0x5A 0xB1 0x84 0x20 0x6E 
0x0E 0x3E 0x29 0x5A 0xB1 0xF4 0x38 0x6E

#9 = Treasure
0x00 0x7C 0x3E 0x08 0x3E 0x3E 0x3E 0x00 
0x00 0xFC 0x7E 0x80 0xF6 0xFE 0x7E 0x00

#10 = Treasure Opened
0x00 0x30 0x00 0x00 0x3E 0x3E 0x3E 0x00 
0x00 0x00 0xFC 0x82 0xFE 0xFE 0x7E 0x00 

#11 = Locked Door
0x00 0x7E 0x7E 0x7E 0x76 0x76 0x7E 0x00
0x00 0x7E 0x42 0x42 0x42 0x42 0x42 0x00

#12 = Pillar
0xFF 0x7E 0x3C 0x3C 0x3C 0x3C 0x7E 0xFF
0xFF 0x00 0x28 0x28 0x28 0x28 0x00 0xFF

#13 = Blank Space (impassable)
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00

#14 = Tower
0x18 0x7E 0x0C 0x7E 0x18 0x7E 0x30 0x7E
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00

#15 = Tower Top
0x99 0xFF 0x00 0x7E 0x3C 0x7E 0x3C 0x7E
0x00 0x00 0x00 0x00 0x10 0x10 0x00 0x00

#16, 17, 18 = Temple roof
0x00 0x00 0x00 0x03 0x0C 0x33 0xCF 0x3F
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00

0x00 0x3C 0xDB 0x3C 0xFF 0xFF 0xFF 0xFF
0x00 0x00 0x18 0x24 0x18 0x24 0x18 0x00

0x00 0x00 0x00 0xC0 0x30 0xCC 0xF3 0xFC
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00

#19-27 = Sunset  over Castle Daiouika
0x00 0x00 0x00 0x00 0x00 0x01 0x03 0x07
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00

0x00 0x07 0x1F 0x7F 0xFF 0xFF 0xFF 0xFE
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00

0xC7 0xD3 0xCC 0xCF 0xCC 0xC3 0xC7 0x00
0x00 0x10 0x10 0x10 0x10 0x10 0x10 0x00

0x00 0xE0 0x78 0x7E 0xFF 0xFF 0xFF 0x7F
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00

0x00 0x00 0x00 0x00 0x00 0x80 0xC0 0xE0
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00

0x00 0x0F 0x0F 0x00 0x1F 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0xFF 0x00

0x00 0xFE 0xFE 0x00 0xFF 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0xFF 0x00

0x00 0x7F 0x7F 0x00 0xFF 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0xFF 0x00

0x00 0xF0 0xF0 0x00 0xF8 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0xFF 0x00

#28 = Cliff North Edge
0x00 0x00 0x00 0x00 0x00 0x00 0xCE 0xB3
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00

#29 = Cliff South Edge and wall
0x10 0xAD 0x66 0x11 0x55 0x44 0x11 0x44
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00

#30 = Fort
0x1C 0x1C 0x10 0xDB 0xFF 0x7E 0x66 0x66 
0x0C 0x0C 0x00 0xDB 0xFF 0x00 0x66 0x66

#31 = Cliff Wall
0x44 0x15 0x51 0x55 0x54 0x04 0x45 0x51
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00

#32 = Brick
0xEE 0x00 0xBB 0x00 0x77 0x00 0xDD 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00

#33 = Castle Brick
0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF
0xEE 0x00 0xBB 0x00 0x77 0x00 0xDD 0x00

: playerSprite
0x02 0x32 0x7A 0x6A 0xB7 0x82 0x22 0xC2
0x02 0x32 0x52 0x6A 0xB0 0xE8 0x2E 0xC0

: playerSprite_dead
0x08 0xFF 0x08 0x20 0xA6 0x8F 0x43 0x0C
0x00 0xF0 0x00 0x20 0xA6 0xBF 0x7F 0x0E 

: enemiesSprites
#1 = Shrimp
0x00 0x3C 0x39 0x76 0x68 0x46 0x20 0x00
0x00 0x14 0x00 0x00 0x00 0x00 0x00 0x00

#2 = Lobster
0x00 0x0E 0x1F 0x3F 0x0C 0x5F 0x5C 0x3F
0x00 0x00 0x00 0x00 0x00 0x57 0x54 0x07

#3 = Waterbear
0x00 0x3E 0x7F 0xFF 0xFF 0xFF 0x5E 0x55
0x00 0x36 0x5B 0xEB 0xAB 0xEB 0x14 0x15

#4 = Skull
0x38 0x7C 0xBA 0xBA 0x7C 0x44 0x54 0x38
0x38 0x7C 0xBA 0x92 0x7C 0x00 0x54 0x38

#5 = Squid
0x0C 0x1E 0x3F 0x80 0x9E 0x6C 0x92 0x7E
0x0C 0x1E 0x03 0x8A 0x8E 0x04 0x80 0x58

#6 = Wizard
0x18 0x3C 0x7E 0xFF 0x18 0x3C 0xBD 0x66
0x18 0x3C 0x7E 0xFF 0x24 0xBD 0x99 0x00

: hurtBox
0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF

#The artifacts kind of break the 8x8 rule, since they don't need to be drawn on a grid.

: swordSprite #10 px
0x10 0x18 0x10 0x18 0x10 0x18 0x3C 0x18 0x08 0x18 
0x01 0x82 0x41 0x82 0x40 0x00 0x3C 0x08 0x18 0x18

: armourSprite #8 px
0x18 0x3C 0x66 0xDB 0xD3 0x66 0xFF 0x7E
0x00 0x3C 0x7E 0x7E 0x7E 0x7E 0x3C 0x00

: keySprite #9px
0x08 0x1C 0x3E 0x14 0x1C 0x08 0x18 0x08 0x18
0x08 0x1C 0x3E 0x00 0x1C 0x08 0x08 0x08 0x08


# The frame that the world/map is drawn within.
#  The corners are all 2x2 in white. The border is a single pixel line.

: frame-corner-nw
0x30 0x20

: frame-corner-ne
0xC0 0x40

: frame-corner-sw
0x20 0x30

: frame-corner-se
0x40 0xC0

: frame-h
0xFF 

: frame-v
0x80

# Victory Screen! It's divided into 4 parts, depending on whether the player has the sacred armor and/or the sacred sword!
: vic-sword
	0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08
	0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08
	
	0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18
	0x18 0x18 0x18 0x18 0x18 0x18 0x18 0x18
	
	0x1C 0x1C 0x1C 0x1C 0x1C 0x1C 0x3C 0x3C
	0x1C 0x1C 0x1C 0x1C 0x1C 0x1C 0x3C 0x3C
	
	0x3C 0x3C 0x3C 0x3C 0x3C 0x3C 0x3C 0x3C 
	0x3C 0x3C 0x3C 0x3C 0x3C 0x3C 0x3C 0x3C 
	
	0xFF 0xFF 0x18 0x38 0x7E 0x7F 0x3C 0x18
	0x00 0x00 0x00 0x38 0x7E 0x7F 0x3F 0x07
	
	0x19 0x00 0x00 0x00 0x03 0x07 0x07 0x0C
	0x03 0x00 0x00 0x00 0x03 0x07 0x07 0x0C

: vic-sword-sacred



: vic-player
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	
	0x00 0x00 0x00 0x00 0x03 0x0F 0x1F 0x1F
	0x00 0x00 0x00 0x00 0x03 0x0F 0x1F 0x1F
	
	0x3F 0x3F 0x3F 0x7E 0x7F 0x7F 0x7F 0x7E
	0x3F 0x3F 0x3F 0x7E 0x7E 0x7E 0x7E 0x7E
	
	0x3F 0x3F 0x3F 0x1F 0x1F 0x8F 0x07 0x79
	0x3F 0x3F 0x3F 0x1F 0x1F 0x8F 0x07 0xFF
	
	0xFC 0xFC 0x00 0x01 0xE7 0xFF 0xFF 0x7E
	0xFF 0xFC 0x00 0x01 0xE7 0xFF 0xFF 0x7E
	
	#--------------------------------------
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	
	0x00 0x00 0x00 0x7E 0xFF 0xFF 0xFF 0xFF
	0x00 0x00 0x00 0x7E 0xFF 0xFF 0xFF 0xFF
	
	0xFE 0x3C 0x1D 0xDE 0x3E 0x3C 0x1E 0x18
	0xFE 0x3C 0x1C 0x1C 0x1C 0x1C 0x1E 0x18
	
	0x37 0xEC 0xE8 0xE8 0xE8 0xEC 0xE7 0xF0
	0x37 0xEC 0xE8 0xE8 0xE8 0xEC 0xE7 0xF1
	
	0x01 0x63 0xF1 0xE1 0xC0 0xC0 0x80 0x00
	0x77 0x73 0xF1 0xE1 0xC0 0xC0 0x80 0x00
	
	#--------------------------------------
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	0x00 0x00 0x00 0x00 0x00 0x00 0x01 0x01
	
	0x00 0x00 0x00 0x00 0x03 0x0F 0x1F 0x1F
	0x03 0x07 0x07 0x0F 0x0F 0x0F 0x1F 0x1F
	
	0x39 0x31 0x30 0x76 0xB9 0xD9 0xE1 0xE8
	0x39 0x31 0x30 0x70 0xB0 0xD0 0xE0 0xE8
	
	0x77 0x76 0xB5 0x7A 0x7A 0x7A 0x7B 0xF9
	0x77 0x76 0x35 0x3A 0x3A 0x3A 0x7B 0xFD
	
	0x78 0xB8 0x50 0x50 0x50 0xA8 0x48 0x98
	0x7E 0xBF 0x5F 0x5F 0x5F 0xBF 0x5B 0xB8
	
	0x9C 0xCF 0xC7 0xE0 0xFC 0x7F 0x0F 0x01
	0x9C 0xCF 0xC7 0xE0 0xFC 0x7F 0x0F 0x01
	
: vic-player-armor

: vic-princess
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	0x1F 0x3F 0x3F 0x7F 0xFF 0xFF 0xFF 0xFF

	0x00 0x00 0x00 0x7C 0xFF 0xFF 0xFF 0xFF
	0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF
	
	0xF9 0xF8 0xF0 0xF6 0xF9 0xF9 0xF8 0xF0
	0xF9 0xF8 0xF0 0xF0 0xF0 0xF0 0xF0 0xF0
	
	0x19 0xEF 0x37 0x17 0x17 0x17 0x37 0xEF
	0x19 0xEF 0x37 0x17 0x17 0x17 0x37 0xEF
	
	0x00 0x00 0x1E 0x3F 0x27 0x03 0x03 0x01
	0x1F 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF
	
	0xF1 0xF8 0x1C 0x66 0x72 0x38 0x8E 0xE0
	0xF1 0xF8 0xFC 0xE6 0x72 0x38 0x8E 0xE0
	
	#--------------------------------------
	0x06 0x06 0x0C 0x0C 0x0C 0x04 0x04 0x06
	0xF2 0xF2 0xF4 0xF4 0xF4 0xFC 0xFC 0xFA
	
	0x06 0x03 0x01 0x00 0x80 0xE0 0xF0 0xF8
	0xFA 0xF9 0xF8 0xF8 0xF8 0xF8 0xFC 0xFC
	
	0xFC 0xFC 0xFE 0xFE 0xFE 0xFE 0xFE 0xFE
	0xFC 0xFC 0xFE 0xFE 0xFE 0xFE 0xFE 0xFE
	
	0xFC 0xFC 0xF8 0xF8 0xF0 0xE0 0xC0 0x01
	0xFC 0xFC 0xF8 0xF8 0xF0 0xE0 0xE0 0xF1
	
	0x03 0x03 0x03 0x03 0x01 0x8F 0xAF 0xEE
	0xF3 0xF3 0xFB 0xFB 0xF9 0xFF 0xFF 0xEE
	
	0xE0 0xC0 0x00 0x00 0x00 0x00 0x00 0x00
	0xE0 0xC0 0x00 0x00 0x00 0x00 0x00 0x00
	
	#--------------------------------------
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	
	0x00 0x00 0x80 0xC0 0x60 0x30 0x30 0x18
	0x00 0x00 0x80 0x40 0x20 0x10 0x10 0x08
	
	0x18 0x0C 0x0C 0x0C 0x18 0x18 0x30 0x30
	0x08 0x04 0x04 0x04 0x08 0x08 0x10 0x10
	
	0x60 0x60 0x60 0x60 0x60 0x60 0x30 0x98 
	0x20 0x20 0x20 0x20 0x20 0x20 0x10 0x88
	
	0xC0 0x60 0x20 0x80 0x80 0x80 0x00 0x00
	0xC0 0x60 0x20 0x80 0x80 0x80 0x00 0x00
	
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	
: vic-quest-complete-text
	0x00 0x0C 0x1F 0x1B 0x19 0x1D 0x0A 0x0D #Q
	0x00 0x1E 0x12 0x12 0x12 0x14 0x1A 0x00
	
	0x00 0x0C 0x7F 0xF5 0xFE 0xF4 0xF5 0x76 #UE
	0x00 0xAD 0xA9 0xAD 0xA8 0xA8 0xED 0x00 
	                                        #S
	0x00 0x18 0xDD 0x19 0xD9 0xC8 0x48 0xC8 #T
	0x00 0xB9 0x11 0x91 0x91 0x91 0x91 0x00
	                                        #C
	0x00 0xC9 0xFB 0x9F 0x9F 0x8E 0xCA 0xEE #O
	0x00 0xDD 0x15 0x15 0x15 0x15 0xDD 0x00
	                                        #M
	0x00 0x12 0x2B 0xCE 0xAC 0x9F 0x8A 0x8A #P
	0x00 0x16 0xB5 0x55 0x16 0x14 0x14 0x00
																					
	0x00 0x0C 0x2E 0xE4 0xEE 0x64 0x44 0x36 #LE
	0x00 0x4D 0x48 0x4C 0x48 0x48 0x6C 0x00
	                                        #T
	0x00 0xDA 0xFF 0xCB 0xDD 0x49 0x4A 0x4D #E!
	0x00 0xDA 0x92 0x9A 0x92 0x90 0x9A 0x00
	
	
# Game over screen
: gameover-image
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00

	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00

	0x00 0x00 0x00 0x00 0x03 0x07 0x07 0x0F
	0x00 0x00 0x00 0x00 0x03 0x07 0x07 0x0F

	0x0F 0x0E 0x8E 0xFE 0x3C 0x00 0x00 0x00
	0x3F 0x7F 0xFF 0xFE 0x3C 0x43 0x3F 0x1F
	
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	0x07 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	
	#--------------------------------------
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	0x00 0x00 0x00 0x00 0x00 0x00 0x07 0x3C
	
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
	0xFF 0x00 0x03 0x1F 0x00 0x01 0x00 0x00

	0x00 0x00 0x40 0x7C 0x1B 0xC7 0xCF 0xEF
	0x00 0x00 0x40 0x7C 0x1A 0xC7 0xFF 0xEE
	
	0xDF 0xDD 0xDB 0x57 0x0F 0x0E 0x1E 0x1F
	0xDF 0xDD 0xDB 0x57 0x0F 0xEE 0xFE 0xFF
	
	0x0F 0x03 0x00 0x00 0x00 0x00 0x00 0x00
	0xEF 0xF3 0x04 0x00 0x00 0x00 0x00 0x00
	
	#--------------------------------------
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	0x00 0x00 0x00 0x00 0x00 0x00 0x80 0x00
	
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	0xFF 0x3F 0xC0 0xF8 0x70 0xFE 0x1C 0x30
	
	0x00 0x00 0x7F 0xBF 0x7F 0xEF 0xDF 0xFF
	0x00 0x00 0x6F 0x07 0x0F 0x0F 0x0F 0x47
	
	0xFF 0xFD 0xF9 0xE3 0x67 0xF6 0x7E 0x00
	0x6F 0xFD 0xF9 0xE1 0x61 0xF2 0x7E 0x80
	
	0xF8 0xFE 0x03 0x00 0x00 0x00 0x00 0x00 
	0xFF 0xFF 0x03 0x00 0x00 0x00 0x00 0x00
	
	#--------------------------------------
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	
	0x00 0x00 0x00 0x00 0x06 0x0E 0x0E 0x06
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	
	0x07 0x07 0x03 0x0F 0x1F 0x1B 0x03 0x03
	0xE0 0xC0 0x00 0x00 0x00 0x03 0x03 0x03
	
	0x01 0x01 0x81 0xF1 0xF9 0xFC 0xFC 0xBC
	0x01 0x01 0x81 0xF1 0xF9 0xFC 0xFF 0xBC
	
	0x8D 0xC5 0xE5 0xB9 0x7D 0xE2 0xC6 0x78
	0x8D 0x85 0xC5 0xB9 0x7D 0xE2 0xC7 0x78
	
	0x00 0x00 0x80 0x00 0x00 0x00 0x00 0x00
	0x87 0xFF 0xE0 0x00 0x00 0x00 0x00 0x00 
	
	#--------------------------------------
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	
	0x00 0x30 0xF0 0xC0 0x80 0x80 0xC0 0xC0
	0x00 0x00 0x00 0x00 0x80 0x80 0xC0 0xC0 
	
	0xC0 0xC0 0xC0 0xE0 0xE0 0xE0 0xE0 0xE0
	0xC0 0xC0 0xC0 0xE0 0xE0 0xE0 0xF0 0xE0
	
	0x00 0x80 0xC0 0xC0 0x60 0x60 0xC0 0x00
	0xFC 0xFE 0xFF 0xFF 0x7F 0xFE 0xDC 0x38
	
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	0xE0 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
	

: gameover-text
	0x0A 0x1F 0x18 0x1E 0x1B 0x0B 0x0D 0x0F #G
	0x1E 0x10 0x10 0x16 0x12 0x12 0x1E 0x00
	
	0x31 0x59 0x65 0x55 0x7D 0x2D 0x25 0x24 #A
	0x31 0x49 0x49 0x79 0x49 0x49 0x49 0x00
																					#M
	0x13 0x2B 0x49 0x2B 0x1B 0x19 0x08 0x09 
	0x13 0xB2 0x52 0x13 0x12 0x12 0x13 0x00 
																					#E
	0x81 0xC3 0x03 0x03 0xC3 0x01 0x81 0xC1
	0x83 0x02 0x02 0x82 0x02 0x02 0x83 0x00 #O
																					
	0x88 0xAC 0x64 0x64 0x63 0x62 0xA1 0xE1 
	0xC8 0x48 0x48 0x45 0x45 0x42 0xC2 0x00 #V
	
	0x9C 0x5E 0x48 0x58 0x9E 0x88 0x04 0x0E #E
	0x9C 0x90 0x90 0x1C 0x10 0x10 0x1C 0x00
	
	0xE0 0xF0 0x48 0x68 0xB0 0xC0 0x50 0x48 #R
	0xE0 0x90 0x90 0xE0 0xC0 0xA0 0x90 0x00

: title

	0x00 0x00 0x06 0x04 0x04 0x06 0x00 0x00 #--C
	0x00 0x00 0x06 0x04 0x04 0x06 0x00 0x00

	0x03 0x05 0x11 0x01 0x01 0x03 0x03 0x07 #O
	0x02 0x07 0x15 0x19 0x01 0x01 0x03 0x03
	
	0x0E 0x1E 0x3C 0xFC 0xF8 0xF8 0xF0 0xF0 
	0x07 0x07 0x0E 0x1E 0x7C 0xFC 0xF8 0xF0
	
	0xF0 0xF0 0xF0 0xF0 0xF0 0xF0 0xF0 0xF0
	0xF0 0xF0 0xF0 0xF0 0xF0 0xF0 0xF0 0xF0
	
	0x70 0x70 0x70 0x70 0x70 0x70 0x70 0x30
	0xF0 0xF0 0xF0 0xF0 0xF0 0xF0 0xF0 0xF0
	
	0x38 0x3C 0x1E 0x0E 0x07 0x07 0x03 0x03 
	0xF0 0xF8 0xFC 0x3C 0x1E 0x0E 0x0F 0x07
	
	0x01 0x01 0x01 0x01 0x01 0x01 0x00 0x00
	0x07 0x03 0x03 0x01 0x01 0x01 0x01 0x01 
	
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	0x00 0x00 0x00 0x06 0x05 0x06 0x04 0x00 #-P
	
	#--------------------------------------
	0x00 0x00 0xC4 0xAA 0xCE 0xAA 0x00 0x00 #--RA
	0x00 0x00 0xC4 0xAA 0xCE 0xAA 0x00 0x00
	
	0x00 0x80 0x80 0x80 0xC0 0xC0 0xE0 0xF0
	0x00 0x00 0x00 0x80 0x80 0x80 0xC0 0xC0 
	
	0xF8 0xFC 0x7E 0x3F 0x1F 0x1F 0x0F 0x0F
	0xE0 0xF0 0xF8 0xFC 0x7E 0x3F 0x1F 0x0F
	
	0x0F 0x0F 0x0E 0x0E 0x0E 0x0E 0x0E 0x0C
	0x0F 0x0F 0x0F 0x0F 0x0F 0x0F 0x0F 0x0F
	
	0x0C 0x0C 0x0C 0x0C 0x0C 0x0C 0x0C 0x1C
	0x0F 0x0F 0x0F 0x0F 0x0F 0x0F 0x0F 0x0F
	
	0x1C 0x7C 0xFC 0xF0 0xE0 0xC0 0x80 0x80
	0x0F 0x1F 0x3F 0x7E 0xFC 0xF8 0xF0 0xE0 
	
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	0xE0 0xC0 0xC0 0x80 0x80 0x00 0x00 0x00 
	
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	0x00 0x00 0x00 0x62 0x57 0x64 0x53 0x00 #-RE
	
	#--------------------------------------
	0x00 0x00 0xE8 0x4D 0x4A 0x48 0x00 0x00 #--TM
	0x00 0x00 0xE8 0x4D 0x4A 0x48 0x00 0x00
	
	0x00 0x00 0x00 0x00 0x00 0x01 0x01 0x01
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x01
	
	0x00 0x00 0x08 0x08 0x08 0x1C 0x1C 0x3E #c
	0x01 0x00 0x00 0x08 0x08 0x08 0x1C 0x1C
	
	0x36 0x72 0x63 0x61 0x61 0x61 0x61 0x60
	0x1E 0x36 0x37 0x33 0x63 0x61 0x61 0x62
	
	0x60 0x20 0x21 0x21 0x33 0x36 0x16 0x1C
	0x60 0x60 0x60 0x61 0x61 0x63 0x37 0x37
	
	0x1C 0x08 0x08 0x08 0x00 0x00 0x00 0x00
	0x3E 0x1C 0x1C 0x08 0x08 0x08 0x00 0x00
	
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
	
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	0x00 0x00 0x00 0x6C 0x48 0x24 0x6C 0x00 #-SS
	
	#--------------------------------------
	0x00 0x00 0x92 0xAB 0xBA 0xAA 0x00 0x00 #--AN
	0x00 0x00 0x92 0xAB 0xBA 0xAA 0x00 0x00
	
	0x02 0x02 0x02 0x02 0x03 0xF3 0xFF 0x8F #t
	0x00 0x00 0x02 0x02 0x02 0x62 0xFB 0xFF
	
	0x83 0xC3 0x43 0x23 0x03 0x03 0x03 0x03 
	0x8F 0xC3 0xC3 0x63 0x03 0x03 0x03 0x03
	
	0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01
	0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03
	
	0x01 0x03 0x03 0x03 0x03 0x02 0x02 0x06
	0x03 0x03 0x03 0x03 0x03 0x03 0x03 0x03
	
	0x46 0x46 0x24 0x14 0x18 0x00 0x00 0x00
	0x03 0x47 0x66 0x36 0x3C 0x18 0x00 0x00
	
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
	
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	0x00 0x00 0x00 0x49 0x5D 0x10 0x0C 0x00 #-"E"
	
	#--------------------------------------
	0x00 0x00 0x5C 0x50 0xD4 0x5C 0x00 0x00 #--NG
	0x00 0x00 0x5C 0x50 0xD4 0x5C 0x00 0x00
	
	0x00 0x00 0x00 0x00 0x00 0x08 0x04 0xF8
	0x00 0x00 0x00 0x00 0x00 0x08 0x04 0xFC
	
	0x00 0x00 0x01 0x01 0x81 0x83 0x83 0x86 #o
	0x00 0x00 0x00 0x01 0x01 0x01 0x03 0x03 
	
	0x86 0x8E 0x8C 0x8C 0x8C 0x8C 0x8C 0x8C
	0x06 0x86 0x86 0x8E 0x8C 0x8C 0x8C 0x8C
	
	0x0C 0x04 0x04 0x04 0x06 0x06 0x02 0x03
	0x8C 0x8C 0x8C 0x8C 0x8C 0x8C 0x86 0x06
	
	0x03 0x01 0x01 0x01 0x00 0x00 0x00 0x00 
	0x07 0x03 0x03 0x01 0x01 0x01 0x00 0x00
	
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
	
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	0x00 0x00 0x00 0x15 0x25 0x21 0x41 0x00 #-/ "
	
	#--------------------------------------
	0x00 0x00 0x66 0x55 0x66 0x45 0x00 0x00 #--PR
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	
	0x00 0x00 0x00 0x00 0x01 0x81 0x83 0xC2 
	0x00 0x00 0x00 0x00 0x00 0x01 0x81 0x83
	
	0xC2 0xE4 0x60 0x60 0x60 0x60 0x60 0x60
	0xC2 0xC6 0xC0 0x60 0x60 0x60 0x60 0x60
	
	0x60 0x60 0x60 0x40 0x40 0xC0 0xC0 0xC0
	0x60 0x60 0x60 0x60 0x60 0x60 0xE0 0xE0
	
	0x81 0x01 0x01 0x01 0x00 0x00 0x00 0x00
	0xC0 0x81 0x81 0x01 0x01 0x03 0x00 0x00
	
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
	
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	0x00 0x00 0x00 0xD1 0x10 0xC0 0x40 0x80 #-6"
	
	#--------------------------------------
	0x00 0x00 0x26 0x74 0x42 0x36 0x00 0x00 #--ES
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	
	0x00 0x00 0x00 0x00 0x04 0x04 0x8E 0x8E # m
	0x00 0x00 0x00 0x00 0x00 0x04 0x04 0x8E
	
	0xDB 0x5B 0x51 0x71 0x61 0x60 0x40 0x40
	0x8E 0xDB 0x5B 0x73 0x73 0x71 0x61 0x60
	
	0x40 0x40 0x40 0xC0 0x80 0x80 0x80 0x80
	0x60 0x60 0x40 0x40 0xC0 0xC0 0xC0 0xC0
	
	0x81 0x01 0x01 0x01 0x00 0x00 0x00 0x00 
	0xC0 0x81 0x81 0x81 0x01 0x03 0x00 0x00
	
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
	
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	0x00 0x00 0x00 0xDC 0x94 0x94 0x9C 0x00 #-TO
	
	#--------------------------------------
	0x00 0x00 0x49 0xED 0x8B 0x69 0x00 0x00 #--EN
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	
	0x00 0x00 0x00 0x00 0x08 0x08 0x0C 0x1C
	0x00 0x00 0x00 0x00 0x00 0x08 0x08 0x0C
	
	0x1C 0x36 0xB2 0xE3 0xE3 0xC3 0xC3 0xC3
	0x1C 0x1C 0x36 0xB6 0xA2 0xE3 0xC3 0xC3
	
	0xC3 0xC3 0x82 0x82 0x82 0x82 0x82 0x82
	0xC3 0xC3 0xC3 0xC3 0xC3 0xC3 0xC3 0xC3
	
	0x82 0x02 0x02 0x00 0x04 0x00 0x00 0x00
	0xC3 0x83 0x83 0x83 0x06 0x04 0x00 0x00
	
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
	
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	0x00 0x00 0x00 0x64 0x54 0x64 0x46 0x00 #-PL
	
	#--------------------------------------
	0x00 0x00 0x76 0x24 0x22 0x26 0x00 0x00 #--TS
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	
	0x00 0x00 0x00 0x00 0x01 0x01 0x0F 0x1F # a
	0x00 0x00 0x00 0x00 0x00 0x01 0x05 0x0F
	
	0x3B 0x33 0x33 0x72 0x62 0x62 0x62 0x62
	0x1F 0x3B 0x33 0x33 0x33 0x73 0x63 0x63
	
	0x62 0x62 0x62 0x62 0x63 0x21 0x35 0x35 
	0x63 0x63 0x63 0x63 0x63 0x63 0x67 0x27
	
	0x3C 0x1C 0x18 0x08 0x08 0x00 0x00 0x00
	0x35 0x3D 0x3D 0x1C 0x08 0x08 0x00 0x00
	
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
	
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	0x00 0x00 0x00 0x4A 0xAA 0xE4 0xA4 0x00 #-AL
	
	#--------------------------------------
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	
	0x00 0x00 0x00 0x00 0x00 0x00 0x90 0x90
	0x00 0x00 0x00 0x00 0x00 0x00 0x10 0x10
	
	0xE0 0xE0 0xC0 0x40 0x00 0x00 0x00 0x00
	0xB0 0xE0 0xE0 0xC0 0xC0 0x00 0x00 0x00
	
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	
	
	
	


### AUDIO

: audio-step
3 5 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 

: audio-note
255 0 255 0 255 0 255 0 255 0 255 0 255 0 255 0

: audio-hit
0x5B 0x3A 0xC5 0xC2 0x18 0x2B 0x61 0x83 0x86 0x80 0x00 0x00 0x00 0x00 0x00 0x00

: audio-hurt
0xDC 0x09 0x9A 0xBD 0x7E 0x04 0x05 0x7A 0x78 0x4A 0x57 0x40 0x85 0xFA 0x12 0x80
















